   function [bdraw,m1,CC1,nit]=drawnstafast(y,x,prm,prprec,sig);
%function [bdraw,m1,CC1,nit]=drawnstafast(y,x,prm,prprec,sig); 
% Draw Coefficients from a Normal distribution when prior is also 
%      Normal( prm, prprec^(-1) )  and prprec is the precision
%      Coefficients are restricted to be stationary 
%      This is faster than drawnsta.m but has far less checks and 
%       is intended to be run on a loop 
%
% Inputs 
% =====
% y                 (Txn) 
% x                 (TxK)  
% Prm            (Kx1)  Prior Mean 
% prprec        (KxK)  Prior Precision
% sig              (1x1)  Variance of the errors
%
% Outputs 
% ======
% 
% bdraw       (1xK)  Draw from the posterior normal as a row vector 
% m1            (1xK)  Posterior mean 
% CC1          (KxK)  Cholelsky of the posterior variance 
%                   V1= CC1'*CC1  
% nit             Number of draws generated until stationarity achieved 
% 
nk=length(prm);
V1=( prprec+ (1/sig)*(x'*x)  ) \ eye(nk) ;   % Posterior Variance  
m1=V1*(prprec*prm + (1/sig)*(x'*y) );        % Posterior Mean  
CC1=chol(V1); 
issta = 0; 
nit=0; 
while issta < 1 
    bdraw=m1'+ randn(1,nk)*CC1;
    if min( abs( rootpol([1 bdraw]) ) ) >= 1.001 
        issta=1;
    end
    nit=nit+1; 
end
m1=m1'; 